#pragma once
#include <string>
#include "policy.h"
#include "trader.h"

class PolicyContainer {
public:
	PolicyContainer(const std::string& instrument, Trader* trader);

	void OnMarketData(const MarketData* md);


	void SwitchDay(const std::string& trading_day);

	void ForceClose();
private:
	void CheckPosition();

private:
	const std::string instrument_;
	Policy* policy_ = nullptr;
	const MarketData* last_md_ = nullptr;
	Trader* trader_ = nullptr;
};
